﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>添加用户</title>
<link rel="stylesheet" type="text/css" href="css/css.css" />
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript">
function setCollege_Name(){
	var college_name="";
	college_name = $("#college_id :selected").text();
	$("#college_name").attr("value",college_name);
}
function setClass_Name(){
	var class_name="";
	class_name = $("#class_id :selected").text();
	$("#class_name").attr("value",class_name);
}
function setRole_Name(){
	var role_name="";
	role_name = $("#role_id :selected").text();
	$("#role_name").attr("value",role_name);
}
</script>
</head>
<body>
	<div id="pageAll">
		<div class="pageTop">
			<div class="page">
				<img src="img/coin02.png" /><span><a href="#">首页</a>&nbsp;-&nbsp;<a
					href="#">公共管理</a>&nbsp;-</span>&nbsp;意见管理
			</div>
		</div>
		<div class="page ">
			<!-- 会员注册页面样式 -->
			<div class="banneradd bor">
				<div class="baTopNo">
					<span>用户注册</span>
				</div>
				<form action="#" th:action="@{/createUser}" th:object="${user}" method="post">
				<div class="baBody">
					<div class="bbD">
						&nbsp;&nbsp;&nbsp;用户名：<input name="username" type="text" class="input3" />
					</div>
					<div class="bbD">
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;密码：<input name="password" type="password" 
							class="input3" />
					</div>
					<div class="bbD">
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;年龄：<input name="age" onkeyup="value=value.replace(/[^\d]/g,'')" type="text" class="input3" />
					</div>
					<div class="bbD">
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;手机：<input name="phone" onkeyup="value=value.replace(/[^\d]/g,'')" type="text"  class="input3" />
					</div>
					<div class="bbD">
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;性别：
						<select name="sex" >     
						  <option value="0" >-请选择-</option>     
						  <option value="1" >男</option>     
						  <option value="2" >女</option>  
						 </select>  
					</div>
					<div class="bbD">
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;地址：<input name="adress"  type="text" class="input3" />
					</div>
					<div class="bbD">
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;角色：
						<select name="role_id" id="role_id" onchange="setRole_Name()">     
						  <option   th:value="0">-请选择角色-</option>     
						  <option th:each="role:${roles}" th:value="${role.id}" th:text="${role.name}" ></option>
						 </select>  
					</div>
					<input id="role_name" name="role_name" type="hidden" value="${user.role_name}"/>
					<div class="bbD">
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;学院：
						<select name="college_id" id="college_id" onchange="setCollege_Name()">     
						  <option  id="college" th:value="0">-请选择学院-</option>     
						  <option th:each="college:${colleges}" th:value="${college.id}" th:text="${college.name}" ></option>
						 </select>  
					</div>
					<input id="college_name" name="college_name" type="hidden" value="${user.class_name}"/>
					 <div class="bbD">
						所属专业：
						<select name="class_id" id="class_id" onchange="setClass_Name()">     
						  <option th:value="0">-请选择专业-</option>     
						  <option  th:each="oaclass:${oaclasses}" th:value="${oaclass.id}" th:text="${oaclass.name}" ></option>
						 </select>  
					</div>
					<input id="class_name" name="class_name" type="hidden" value="${user.class_name}"/>
					<div class="bbD">
						<p class="bbDP">
							<input type="submit" class="btn_ok btn_yes" value="提交" />
							<a class="btn_ok btn_no" href="content_user">取消</a>
						</p>
					</div>
				</div>
				</form>
			</div>

			<!-- 会员注册页面样式end -->
		</div>
	</div>
</body>
</html>